/**
 * 定义ra中面板
 * name属性没有指定
 */
Ext.define('Risk.view.tree.Tree', {
    extend: 'Ext.tree.Panel',
    alias: 'widget.trees',
    title:'Tree',
    store: 'tree.AreaTreeStore',
    dockedItems: [{
        xtype: 'toolbar',
        dock: 'top',
        items: [
            { 
            	xtype: 'button',
            	text: '全部收拢' ,
            	action:'ex',
            	handler :function(obj)
            	{
            		obj.up('trees').collapseAll();
            	}
            },
            { 
            	xtype: 'button',
            	text: '全部展开' ,
            	action:'co',
            	handler:function(obj)
            	{
            		obj.up('trees').expandAll();
            	}
           }
        ]
    },
    {
        xtype: 'toolbar',
        height:50,
        layout:  {
            type: 'table',
            // The total column count must be specified here
            columns: 2
        },
        dock: 'bottom',
        items: [
                { xtype: 'button', text: '添加项目',action:'addp'},
                { xtype: 'button', text: '添加区域',action:'adda'},
                { xtype: 'button', text: '删除',action:'del'},
                { xtype: 'button', text: '修改',action:'update'}
        ]
    }],
    initComponent: function() {
        this.callParent(arguments);
    }
});